home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 July
/
Macworld (1999-07).dmg
/
Shareware World
/
Info
/
For Developers
/
Mops 3.4.sea
/
Quick Edit ƒ
/
Stack Notation
< prev
next >
Wrap
Text File
|
1992-12-13
|
3KB
|
78 lines
This is the stack notation key for the file Mops Glossary, and the
various Subject Sorted Glossary files which should accompany the Mops
Glossary.
Considerable effort has been devoted towards providing a consistent and
logical stack notation. In general, compile time stack effects are shown.
Runtime behavior, if different, is contained in the description.
The stack picture will always refer to the parameter stack. The return
stack is not shown. The stack picture will always contain two hyphens
( -- ) even when there is no stack effect. A colon ( : ) appearing after the
stack comment of some words indicates that the input stream must contain
additional information, usually a name for a dictionary entry being created or
the name of a word that has already been defined. The input stream is the
text being loaded either from a source file, typed at the console, or pasted
from the clipboard.
All entities represent the contents of one 32-bit cell on the stack, even
though that entity may only require less than 32 bits. For example, a
character c is in the range 0 through 256, only really needing 8 bits, but
a full 32 bit cell is consumed nonetheless.
When more than one type of stack outcome is possible, the different outcomes
are separated by a | (vertical bar).
addr memory address
len length, usually length of text
c a character, in the range 0 through 256
w a 16-bit number in the range -32,768 through +32,767
n 32-bit signed number in the range +/- 2,147,483,647
flt a floating point number ( we hold pointers on the stack, actually)
b boolean, -1 = true, 0 = false
t boolean true = -1
f boolean false = 0
? flag for a conditional phrase, non-zero is "true"
idx index, as when referring to an array member
point 32-bit toolbox point (2 packed integers).
wptr window pointer.
fcb address of a file control block
str255 address of a Pascal-type counted string. The first byte is the count,
the first char is at address+1.
obj address of the beginning of an object's data, or pointer to object.
When the name of an object is executed, this is the address that is
returned.
class address of a class, or pointer to class.
16-bit-value The stack alignment is offset by 2 bytes to prepare for or
return from a toolbox call.
DICTIONARY HEADERS
lfa link field address. This is the beginning of a header. The link field
is a 32-bit hash value.
nfa name field address. Begins at lfa+4, is variable length.
hca handler code address. handler code occupies 2-bytes, just after the nfa.
cfa code field address.
dfa data field address
selID selector ID. the value left by executing any name ending with :. It
is assumed by the Mops compiler that all words ending with colon ( : )
are selectors, or method names.
INPUT STREAM
name Name for a new entry in the dictionary.
word Name of a word currently in the dictionary.
lit a number